<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>预约实体属性关系图</title>
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.css">
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .container {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 20px;
            margin-bottom: 20px;
            max-width: 800px;
            width: 100%;
        }
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
        }
        .mermaid {
            margin: 30px 0;
            display: flex;
            justify-content: center;
        }
        .mermaid svg {
            max-width: 100%;
            height: auto;
        }
        .primary-key {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>预约实体属性关系图</h1>
        <div class="mermaid">
graph TD
    %% 实体定义
    Appointment[预约]

    %% 属性定义（主键加下划线）
    AppointmentId((<u>id</u>))
    AppointmentTime((appointment_time))
    AppointmentStatus((status))
    AppointmentDesc((description))

    %% 连接实体和属性
    Appointment --- AppointmentId
    Appointment --- AppointmentTime
    Appointment --- AppointmentStatus
    Appointment --- AppointmentDesc

    %% 主键标注
    AppointmentId -.->|PK| Appointment
        </div>
    </div>
    <script>
        mermaid.initialize({
            startOnLoad: true,
            securityLevel: 'loose',
            theme: 'default'
        });
    </script>
</body>
</html> 